#format is
#target-name: target dependencies
#	actions
 
# All Targets
all: Ex2

# Tool invocations
# Executable "Ex2" depends on all the file *.o.
Ex2: run.o AccountReport.o ActivityReport.o Agent.o Bank.o BankAccount.o BuyEvent.o BuySellIndicator.o ConsumeEvent.o CreateEvent.o EnergyMarketLogger.o EnergyReport.o Events.o EventsConfiguration.o GeneralConfiguration.o Market.o MarketReport.o ProfitReport.o Report.o Request.o Resources.o SellEvent.o User.o UserReport.o
	g++  /usr/lib/libPocoUtild.so -L/usr/lib -o target/Ex2 target/run.o target/AccountReport.o target/ActivityReport.o target/Agent.o target/Bank.o target/BankAccount.o target/BuyEvent.o target/BuySellIndicator.o target/ConsumeEvent.o target/CreateEvent.o target/EnergyMarketLogger.o target/EnergyReport.o target/Events.o target/EventsConfiguration.o target/GeneralConfiguration.o target/Market.o target/MarketReport.o target/ProfitReport.o target/Report.o target/Request.o target/Resources.o target/SellEvent.o target/User.o target/UserReport.o

# Depends on the source and header files
run.o: src/run.cpp
	g++ -I/usr/include/Poco -c -o target/run.o src/run.cpp

AccountReport.o: src/AccountReport.cpp include/AccountReport.h
	g++ -I/usr/include/Poco -c -o target/AccountReport.o src/AccountReport.cpp 

ActivityReport.o: src/ActivityReport.cpp include/ActivityReport.h
	g++ -I/usr/include/Poco -c -o target/ActivityReport.o src/ActivityReport.cpp 

Agent.o: src/Agent.cpp include/Agent.h
	g++ -I/usr/include/Poco -c -o target/Agent.o src/Agent.cpp 

Bank.o: src/Bank.cpp include/Bank.h
	g++ -I/usr/include/Poco -c -o target/Bank.o src/Bank.cpp 

BankAccount.o: src/BankAccount.cpp include/BankAccount.h
	g++ -I/usr/include/Poco -c -o target/BankAccount.o src/BankAccount.cpp 

BuyEvent.o: src/BuyEvent.cpp include/BuyEvent.h
	g++ -I/usr/include/Poco -c -o target/BuyEvent.o src/BuyEvent.cpp 

BuySellIndicator.o: src/BuySellIndicator.cpp include/BuySellIndicator.h
	g++ -I/usr/include/Poco -c -o target/BuySellIndicator.o src/BuySellIndicator.cpp 

ConsumeEvent.o: src/ConsumeEvent.cpp include/ConsumeEvent.h
	g++ -I/usr/include/Poco -c -o target/ConsumeEvent.o src/ConsumeEvent.cpp 

CreateEvent.o: src/CreateEvent.cpp include/CreateEvent.h
	g++ -I/usr/include/Poco -c -o target/CreateEvent.o src/CreateEvent.cpp 

EnergyMarketLogger.o: src/EnergyMarketLogger.cpp include/EnergyMarketLogger.h
	g++ -I/usr/include/Poco -c -o target/EnergyMarketLogger.o src/EnergyMarketLogger.cpp 

EnergyReport.o: src/EnergyReport.cpp include/EnergyReport.h
	g++ -I/usr/include/Poco -c -o target/EnergyReport.o src/EnergyReport.cpp 

Events.o: src/Events.cpp include/Events.h
	g++ -I/usr/include/Poco -c -o target/Events.o src/Events.cpp 

EventsConfiguration.o: src/EventsConfiguration.cpp include/EventsConfiguration.h
	g++ -I/usr/include/Poco -c -o target/EventsConfiguration.o src/EventsConfiguration.cpp 

GeneralConfiguration.o: src/GeneralConfiguration.cpp include/GeneralConfiguration.h
	g++ -I/usr/include/Poco -c -o target/GeneralConfiguration.o src/GeneralConfiguration.cpp 

Market.o: src/Market.cpp include/Market.h
	g++ -I/usr/include/Poco -c -o target/Market.o src/Market.cpp 

MarketReport.o: src/MarketReport.cpp include/MarketReport.h
	g++ -I/usr/include/Poco -c -o target/MarketReport.o src/MarketReport.cpp 

ProfitReport.o: src/ProfitReport.cpp include/ProfitReport.h
	g++ -I/usr/include/Poco -c -o target/ProfitReport.o src/ProfitReport.cpp 

Report.o: src/Report.cpp include/Report.h
	g++ -I/usr/include/Poco -c -o target/Report.o src/Report.cpp
	
Request.o: src/Request.cpp include/Request.h
	g++ -I/usr/include/Poco -c -o target/Request.o src/Request.cpp

Resources.o: src/Resources.cpp include/Resources.h
	g++ -I/usr/include/Poco -c -o target/Resources.o src/Resources.cpp
	
SellEvent.o: src/SellEvent.cpp include/SellEvent.h
	g++ -I/usr/include/Poco -c -o target/SellEvent.o src/SellEvent.cpp 

User.o: src/User.cpp include/User.h
	g++ -I/usr/include/Poco -c -o target/User.o src/User.cpp 

UserReport.o: src/UserReport.cpp include/UserReport.h
	g++ -I/usr/include/Poco -c -o target/UserReport.o src/UserReport.cpp 

#tell make that "clean" is not a file name!
.PHONY: clean

#Clean the build directory
clean: 
	rm -rf target/*